import request from '@/utils/request'

// 分页查询充电宝
export function listPowerBank(query) {
    return request({
        url: '/device/powerBank/list',
        method: 'get',
        params: query
    })
}

// 获取充电宝详细信息
export function queryById(id) {
    return request({
        url: '/device/powerBank/' + id,
        method: 'get'
    })
}

// 新增充电宝
export function addPowerBank(powerBank) {
    return request({
        url: '/device/powerBank',
        method: 'post',
        data: powerBank
    })
}

//修改充电宝接口
export function updatePowerBank(powerBank) {
    return request({
        url: '/device/powerBank',
        method: 'put',
        data: powerBank
    })
}

//删除充电宝
export function deletePowerBank(ids) {
    return request({
        url: '/device/powerBank/'+ids,
        method: 'delete',
    })
}


